package com.wang.springframework.test.bean;

import java.util.HashMap;
import java.util.Map;

/**
 * @author wangjianhua
 * @Description
 * @date 2021/8/26/026 14:18
 **/
public class UserDao {

    private static Map<String,String> hashMap = new HashMap<>();

    public void initDataMethod(){
        System.out.println("执行:UserDao init method");
        hashMap.put("10001","zoom");
        hashMap.put("10002","jack");
        hashMap.put("10003","tom");
        hashMap.put("10004","netty");
    }

    public void destroyDataMethod(){
        System.out.println("执行: UserDao destroy method");
        hashMap.clear();
    }

    public String queryUsername(String uId){
        return hashMap.get(uId);
    }
}
